<!doctype html>
<html lang="en" class="text-gray-900 antialiased bg-white js-focus-visible">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <title>Fe - A next generation, statically typed, future-proof smart contract language for the Ethereum Virtual Machine</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <meta name="mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-styl" content="black">
  <meta name="apple-mobile-web-app-title" content="REBASE Book">

  <link rel="apple-touch-icon" href="">

  <meta property="og:locale" content="en_US">
  <meta property="og:type" content="website">
  <meta property="og:description"content="">
  <meta property="og:url" content="https://fe-lang.org">
  <meta property="og:image" content="">

  <meta property="twitter:card" content="">
  <meta property="twitter:title" content="Fe - A next generation, statically typed, future-proof smart contract language for the Ethereum Virtual Machine">
  <meta property="twitter:site" content="fe-lang.org">

  <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@10.7.2/styles/default.min.css">
  <link rel="stylesheet" href="https://unpkg.com/highlightjs@9.16.2/styles/vs2015.css">
</head>
<body>
  <header class="bg-white">
    <div class="sm:flex sm:justify-between sm:items-center sm:py-4 relative z-10 max-w-screen-lg xl:max-w-screen-xl mx-auto">
      <div class="flex items-center justify-between px-4 py-2 sm:p-0">
        <div>
          <img class="h-12 sm:hidden" src="fe-logo-small.svg" alt="Fe Programming Language">
        </div>
        <div class="sm:hidden">
          <button id="menu-btn" type="button" class="block text-gray-600 hover:text-black focus:text-black">
            <svg class="h-6 w-6 fill-current" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
              <path id="menu-icon" class=" block" troke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
              <path id="close-icon" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
            </svg>
          </button>
        </div>
      </div>
      <nav id="menu" class="hidden px-2 pt-2 pb-4 text-center sm:flex sm:p-0 sm:text-left">
        <a href="docs/quickstart/index.html" class="transition duration-100 ease-in-out block text-lg px-2 py-2 hover:bg-gray-700 hover:text-white rounded-sm sm:mt-0 sm:ml-2 sm:px-4" title="Get started" >Get started</a>
        <a href="docs/index.html" class="transition duration-100 ease-in-out mt-1 text-lg block px-2 py-2 hover:bg-gray-700 hover:text-white rounded-sm sm:mt-0 sm:ml-2 sm:px-4" title="Learn">Learn</a>
        <a href="https://fe-lang.zulipchat.com/join/dqvssgylulrmjmp2dx7vcbrq" class="transition duration-100 ease-in-out mt-1 text-lg block px-2 py-2 hover:bg-gray-700 hover:text-white rounded-sm sm:mt-0 sm:ml-2 sm:px-4"title="Community">Community</a>
        <a href="https://blog.fe-lang.org" class="transition duration-100 ease-in-out mt-1 text-lg block px-2 py-2 hover:bg-gray-700 hover:text-white rounded-sm sm:mt-0 sm:ml-2 sm:px-4" title="Blog">Blog</a>
      </nav>
    </div>
  </header>
  <main role="main">
    <section class="px-4 py-12 pt-12 sm:py-16 lg:pt-24 max-w-screen-lg xl:max-w-screen-xl mx-auto md:flex justify-between lg:justify-around items-center bg-red-500 rounded-sm">
      <img class="h-52 lg:h-72 lg:ml-8 xl:ml-0 hidden sm:block" src="fe-logo.svg" alt="Fe Programming language">
      <div class="sm:mt-14 md:ml-16 md:mt-0 max-w-3xl lg:max-w-2xl xl:max-w-3xl xl:-ml-4">
        <h2 class="text-5xl sm:text-6xl xl:text-6xl leading-none font-semibold tracking-tight">The <span class="text-gray-100">next generation</span><br> smart contract language for Ethereum</h2>
        <p class="text-lg sm:text-2xl text-gray-600 leading-6 sm:leading-8 mt-4">Create <span class="text-gray-900 font-semibold">decentralized applications</span> in a powerful, future-proof and <span class="text-gray-900 font-semibold">statically typed</span> language that is <span class="text-gray-900 font-semibold">easy to learn</span>.<p>
        <div class="mt-6 sm:mt-8 flex flex-wrap space-y-4 sm:space-y-0 sm:space-x-4 text-center">
          <a href="docs/quickstart/index.html" class="transition duration-200 ease-in-out w-full sm:w-auto text-lg sm:text-xl text-center bg-gray-900 rounded text-gray-100 py-3 px-6 hover:bg-gray-700 hover:text-white shadow-xl" title="Get started">Get started</a>
          <a id="download-linux" href="https://github.com/ethereum/fe/releases/download/v{{FE_VERSION}}/fe_amd64" class="w-full sm:w-auto px-6 py-3 bg-gray-300 text-gray-600 border border-gray-200 rounded hover:text-gray-900 leading-6 focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-300 focus:outline-none transition-colors duration-200" title="Download">
            <svg xmlns="http://www.w3.org/2000/svg" class="float-left h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
              <path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
            </svg>
            &nbsp; Download v{{FE_VERSION}} for Linux
          </a>
          <a id="download-mac" href="https://github.com/ethereum/fe/releases/download/v{{FE_VERSION}}/fe_mac" class="w-full sm:w-auto px-6 py-3 bg-gray-300 text-gray-600 border border-gray-200 rounded hover:text-gray-900 leading-6 focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-300 focus:outline-none transition-colors duration-200" title="Download">
            <svg xmlns="http://www.w3.org/2000/svg" class="float-left h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
              <path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
            </svg>
            &nbsp; Download v{{FE_VERSION}} for Mac
          </a>
          <a id="download-unsupported" href="https://github.com/ethereum/fe/releases" class="w-full sm:w-auto px-6 py-3 bg-gray-300 text-gray-600 border border-gray-200 rounded hover:text-gray-900 leading-6 focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-300 focus:outline-none transition-colors duration-200" title="Download">
            <svg xmlns="http://www.w3.org/2000/svg" class="float-left h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
              <path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
            </svg>
            &nbsp; Download v{{FE_VERSION}}
          </a>
        </div>
      </div>
    </section>
    <section class="max-w-screen-lg xl:max-w-screen-xl mx-auto lg:mt-8">
      <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 lg:space-x-6">
        <div class="bg-gray-100 p-8 py-10 rounded-sm bg-gradient-to-br from-gray-100 to-gray-200">
          <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="h-10 w-10 mb-3 text-gray-700">
            <path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" />
          </svg>
          <h3 class="text-2xl font-semibold">Beautiful and elegant</h3>
          <p class="text-lg mt-2">The syntax of Fe is largely inspired by Rust. It is easy to learn, even for those who have never dealt with the EVM before. Fe is designed to be safe and equipped with the tooling needed to validate contracts.</p>
        </div>
        <div class="bg-gray-100 p-8 py-10 rounded-sm bg-gradient-to-br from-gray-100 to-gray-200">
          <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="h-10 w-10 mb-3 text-gray-700">
            <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z" />
          </svg>
          <h3 class="text-2xl font-semibold">
            Simple yet powerful
          </h3>
          <p class="text-lg mt-2">Fe seeks to restrict dynamic behavior without limiting expressiveness. Equipped with traits and generics you write clean code without sacrificing compile-time guarantees.
          </p>
        </div>
        <div class="bg-gray-100 p-8 py-10 rounded-sm bg-gradient-to-br from-gray-100 to-gray-200">
          <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="h-10 w-10 mb-3 text-gray-700">
            <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" />
          </svg>
          <h3 class="text-2xl font-semibold">Efficient</h3>
          <p class="text-lg mt-2">While currently YUL is used as IR, in the near future Fe will use the new LLVM-inspired compiler backend sonatina, which enables much more aggressive optimizations.</p>
        </div>
      </div>
      <div class="text-center px-4 py-12 ">
        <p class="text-2xl text-gray-800 leading-7">Explore some advanced contracts written in Fe</p>
        <a class="w-full mt-6 block bg-red-500 rounded px-6 py-3 text-lg text-gray-100 sm:w-auto sm:inline-block hover:bg-red-600 transition duration-200 ease-in-out shadow-lg" href="https://github.com/ethereum/fe/tree/master/crates/test-files/fixtures/demos">See examples &rarr;</a>
      </div>
    </section>

    <section class="max-w-screen-lg xl:max-w-screen-xl mx-auto bg-gray-200 bg-gradient-to-br from-gray-300 to-gray-400 rounded overflow-hidden">
      <div class="p-4 pt-12 pb-10 lg:pt-16">
        <h2 class="text-3xl font-semibold text-center tracking-tight mt-1 lg:text-4xl">The next generation smart contract language.</h2>
        <p class="text-xl mx-auto max-w-3xl text-center mt-6">Fe is an evolving smart contract language that strives to make EVM development safer, simpler and more fun.</p>
      </div>
      <div class="mx-auto max-w-7xl flex flex-col space-y-8 lg:flex-row lg:justify-around xl:pb-8">
        <div class="grid grid-cols-1 sm:grid-cols-2 space-y-8 sm:space-x-6 px-4 lg:grid-cols-1 lg:space-x-0 lg:max-w-md mt-1">
          <div class="p-6 bg-gray-100 shadow-xl">
            <h3 class="text-xl font-semibold mb-2">
              <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline-block align-text-top mr-1 text-green-600" viewBox="0 0 20 20" fill="currentColor">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
              </svg>
              Static typing
            </h3>
            <p>Statically typed and equipped with a powerful compiler, Fe guides us to write robust code and avoid bugs.</p>
          </div>
          <div class="p-6 bg-gray-100 shadow-lg">
            <h3 class="text-xl font-semibold mb-2">
              <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline-block align-text-top mr-1 text-green-600" viewBox="0 0 20 20" fill="currentColor">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
              </svg>
              Improved decidability
            </h3>
            <p>Fe limits dynamic program behavior to improve decidability and allow more precise gas cost estimation.</p>
          </div>
          <div class="p-6 bg-gray-100 shadow-2xl">
            <h3 class="text-xl font-semibold mb-2">
              <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline-block align-text-top mr-1 text-green-600" viewBox="0 0 20 20" fill="currentColor">
                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
              </svg>
              Standard library
            </h3>
            <p>Fe aspires to offer a rich standard library to assist with common tasks of smart contract development.</p>
          </div>
        </div>
        <div class="lg:max-w-2xl lg:flex-1 lg:-mr-18">
          <div class="relative overflow-hidden md:rounded-xl md:rounded-b-none xl:rounded-b-xl shadow-2xl flex bg-gray-500 pb-6 md:pb-0">
            <div class="absolute inset-0 bg-black bg-opacity-75"></div>
            <div class="relative w-full flex flex-col">
              <div class="flex-none h-11 flex items-center px-4">
                <div class="flex space-x-1.5">
                  <div class="w-3 h-3 border-2 rounded-full bg-red-500 border-red-500">
                  </div>
                  <div class="w-3 h-3 border-2 rounded-full bg-yellow-300 border-yellow-300">
                  </div>
                  <div class="w-3 h-3 border-2 rounded-full bg-green-400 border-green-400">
                  </div>
                </div>
              </div>
              <div class="relative border-t border-white border-opacity-10 min-h-0 flex-auto flex flex-col">
                <div class="hidden md:block absolute inset-y-0 left-0 bg-black bg-opacity-25" style="width: 50px;">
                </div>
                <div class="w-full flex-auto flex min-h-0 overflow-auto">
                  <div class="w-full relative flex-auto">
                    <pre class="flex min-h-full text-sm md:text-sm">
                      <div aria-hidden="true" class="hidden md:block text-white text-opacity-50 flex-none py-4 pr-4 text-right select-none" style="width: 50px;">1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23

                      </div>
                      <code class="language-fe flex-auto relative block text-white pt-4 pb-4 px-4 overflow-auto">
// Structs can be emitted as events
struct Signed {
    pub book_msg: String&lt;100&gt;
}

// The `contract` keyword defines a new contract type
contract GuestBook {
    // Strings are generic over a constant number
    // that restricts its maximum size
    messages: Map&lt;address, String&lt;100&gt;&gt;

    // Context is a struct provided by the standard library
    // that gives access to various features of the EVM
    pub fn sign(mut self, mut ctx: Context, book_msg: String&lt;100&gt;) {
        // All storage access is explicit using `self.&lt;some-key&gt;`
        self.messages[ctx.msg_sender()] = book_msg

        // Emit the `Signed` event.
        ctx.emit(Signed(book_msg))
    }

    pub fn get_msg(self, addr: address) -> String&lt;100&gt; {
        // Copying data from storage to memory
        // has to be done explicitly via `to_mem()`
        return self.messages[addr].to_mem()
    }
}
</code>
                    </pre>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
    <section class="max-w-screen-lg xl:max-w-screen-xl mx-auto lg:mt-8">
      <div class="p-4 lg:p-8 py-12 bg-gray-200 rounded-sm">
        <h2 class="text-3xl font-bold text-center">Get involved</h2>

        <p class="leading-7 text-lg max-w-2xl mx-auto mt-6 text-center">Fe is evolving at a rapid pace. Now is a great time to get involved with the next generation smart contract language.</p>

        <div class="grid grid-cols-1 md:grid-cols-4 mt-12 space-y-6 md:space-y-0 md:space-x-6">
          <a href="docs/index.html" title="Read the docs" class="p-6 bg-gray-100 text-gray-900 shadow-lg rounded-sm hover:shadow-xl">
            <h5 class="text-2xl tracking-tight mb-2">Read the docs &rarr;</h5>
            <p class="text-gray-700 leading-5">Learn to write Fe smart contracts</p>
          </a>
          <a href="https://github.com/ethereum/fe/tree/master/crates/test-files/fixtures/demos" title="Check examples" class="p-6 bg-gray-100 text-gray-900 shadow-lg rounded-sm hover:shadow-xl">
            <h5 class="text-2xl tracking-tight mb-2">Check examples &rarr;</h5>
            <p class="text-gray-700 leading-5">Explore advanced contracts written in Fe</p>
          </a>
          <a href="docs/development/index.html" title="Contribute" class="p-6 bg-gray-100 text-gray-900 shadow-lg rounded-sm hover:shadow-xl">
            <h5 class="text-2xl tracking-tight mb-2">Contribute &rarr;</h5>
            <p class="text-gray-700 leading-5">Help improve Fe</p>
          </a>
          <a href="https://fe-lang.zulipchat.com/join/dqvssgylulrmjmp2dx7vcbrq" title="Discuss" class="p-6 bg-gray-100 text-gray-900 shadow-lg rounded-sm hover:shadow-xl">
            <h5 class="text-2xl tracking-tight mb-2">Discuss &rarr;</h5>
            <p class="text-gray-700 leading-5">Discuss and explore with the community</p>
          </a>
        </div>
      </div>
    </section>

  </main>
  <footer class="md:mt-8 mb-4">
    <section class="max-w-screen-lg xl:max-w-screen-xl mx-auto bg-gray-700 text-gray-200 rounded-sm py-16 pb-12 px-4 sm:px-6 md:px-8">
      <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-y-10">
        <div>
          <img class="h-24" src="fe-logo.svg" alt="Fe Programming language">
          <p class="mt-4 text-gray-400 text-sm">Fe Programming Language<br>&copy; 2021-2023 Ethereum Foundation</p>
        </div>
        <div>
          <h4 class="font-semibold mb-4">Get Started</h4>
          <ul>
            <li><a class="block py-1 hover:text-white" href="docs/quickstart/index.html" title="Quickstart">Quickstart</a></li>
            <li><a class="block py-1 hover:text-white" href="/docs/index.html" title="Documentation">Documentation</a></li>
            <li><a class="block py-1 hover:text-white" href="https://github.com/ethereum/fe/tree/master/crates/test-files/fixtures/demos" title="Examples">Examples</a></li>
          </ul>
        </div>
        <div>
          <h4 class="font-semibold mb-4">Community</h4>
          <ul>
            <li><a class="block py-1 hover:text-white" href="https://twitter.com/official_fe" title="Fe on Twitter">Twitter</a></li>
            <li><a class="block py-1 hover:text-white" href="fe-lang.zulipchat.com/join/dqvssgylulrmjmp2dx7vcbrq" title="Fe on Zulip">Zulip</a></li>
            <li><a class="block py-1 hover:text-white" href="https://github.com/ethereum/fe" title="Fe on GitHub">GitHub</a></li>
          </ul>
        </div>
        <div>
          <h4 class="font-semibold mb-4">Project</h4>
          <ul>
            <li><a class="block py-1 hover:text-white" href="docs/spec/index.html" title="Language Spec">Language Spec</a></li>
            <li><a class="block py-1 hover:text-white" href="compiler-docs/fe/index.html" title="Compiler API Docs">Compiler API Docs</a></li>
            <li><a class="block py-1 hover:text-white" href="https://github.com/ethereum/fe/blob/master/LICENSE.md" title="License">License</a></li>
            <li><a class="block py-1 hover:text-white" href="docs/code_of_conduct.html" title="Code of Conduct">Code of Conduct</a></li>
          </ul>
        </div>
      </div>
    </section>
  </footer>
  <script>
    let menuBtn = document.querySelector('#menu-btn');
    let menu = document.querySelector('#menu');
    let menuIcon = document.querySelector('#menu-icon');
    let closeIcon = document.querySelector('#close-icon');

    function toggleMenu() {
        menu.classList.toggle('block');
        menu.classList.toggle('hidden');
        menuIcon.classList.toggle('block');
        menuIcon.classList.toggle('hidden');
        closeIcon.classList.toggle('block');
        closeIcon.classList.toggle('hidden');
    }

    menuBtn.addEventListener('click', toggleMenu)

    let downloadLinux = document.querySelector('#download-linux');
    let downloadMac = document.querySelector('#download-mac');
    let downloadUnsupported = document.querySelector('#download-unsupported');

    let buttons = {
      'linux': downloadLinux,
      'mac': downloadMac,
      'windows': downloadUnsupported,
      'unknown_os': downloadUnsupported
    };

    function enableDownloadFor(os) {
      for (const key in buttons) {
          buttons[key].classList.add('hidden');
      }
      buttons[os].classList.remove('hidden');
    }

    var detectedOS = "unknown_os";

    if (navigator.userAgent.indexOf("Mac") != -1) {
        detectedOS = "mac";
    } else if (navigator.userAgent.indexOf("Win") != -1) {
        detectedOS = "windows";
    } else if (navigator.userAgent.indexOf("Linux") != -1) {
        detectedOS = "linux";
    }

    enableDownloadFor(detectedOS);

  </script>
  <script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.2/highlight.min.js"></script>
  <script src="docs/theme/custom-highlight.js"></script>
  <script>hljs.highlightAll();</script>
</body>
</html>
